<?php 

if (empty($_GET['topic_id'])) die();

$topic_id = intval($_GET['topic_id']);

$topic = dt_query_one("SELECT title, forum_id FROM forum_topic WHERE id = $topic_id");
if (!$topic) die('获取数据失败！^_^');

$forum = dt_query_one("SELECT id, name, kind FROM forum WHERE id = ".$topic['forum_id']);
if (!$forum) die('获取数据失败！^_^');

?>
<?php require_once('inc/umediter_text.html') ?> 
<div class="container">
	<div class="row clearfix">
		<ol class="breadcrumb forum-breadcrumb">
			<li><a href="?c=forum"><span class="glyphicon glyphicon-home"></span> 首页</a></li>
			<?php if (0 != $forum['kind']) { ?>
			<li><a href="?c=forum&a=forum_list&m_falter=5&kind=<?php echo $forum['kind'] ?>"><img src="img/finance/hengxin_logo_sm_1.png" height="25px"> <?php echo dt_query_one("SELECT name FROM forum_kind WHERE id = ".$forum['kind'])['name'] ?></a></li>
			<?php } ?>
			<li><a href="?c=forum&a=topic_list&forum_id=<?php echo $forum['id'] ?>"><?php echo $forum['name'] ?></a></li>
			<li><a href="?c=forum&a=topic_show&topic_id=<?php echo $topic_id ?>"><?php echo $topic['title'] ?></a></li>
			<li class="active">付费置顶</li>
		</ol>
	</div>
</div>
<div class="container">
	<div class="forum-add pay">
		<div class="row clearfix">
			<div class="col-md-12 column">
				<h3><span class="glyphicon glyphicon-edit"></span> 在 [<?php echo $forum['name'] ?>] 付费置顶 [<?php echo $topic['title'] ?>]</h3>
				<hr class="solid">
				<div class="alert alert-danger" role="alert">
					<b>付费置顶：</b>
					<ol>
						<li>付费置顶：每1元置顶8分钟，金额高位置靠前。</li>
						<li>首页展示：置顶期限内始终首页展示。</li>
						<li>自动推荐：付费贴自动设置为推荐，且任何用户无权取消推荐。</li>
						<li>删除保护：除发帖人自己外任何用户无权删除付费贴。</li>
					</ol>
				</div>
				<div class="col-md-11 column">
					<form class="form-horizontal" id="do_pay_topic_top" action="javascript:do_pay_topic_top(<?php echo $forum['id'] ?>)">
						<fieldset>
							<!-- forum_id -->
							<input type="hidden" name="topic_id" value="<?php echo $topic_id?>"/>
							<!-- Text input-->
							<div class="form-group">
								<label class="col-md-2 control-label">支付金额（元）</label>  
								<div class="col-md-9">
									<input name="pay" type="text" placeholder="0.00" class="form-control input-md" required="">
								</div>
							</div>
							<!-- Text input-->
							<div class="form-group">
								<label class="col-md-2 control-label">密码</label>  
								<div class="col-md-9">
									<input id="password" name="password" type="password" placeholder="密码" class="form-control input-md" required="">
								</div>
							</div>
							<!-- token -->
							<input type="hidden" name="token" value="<?php echo get_token() ?>"/>
							<!-- Button -->
							<div class="form-group">
								<label class="col-md-2 control-label"></label>
								<div class="col-md-3">
									<button class="btn btn-danger btn-block">确认付费置顶</button>
								</div>
								<div class="col-md-6">
								</div>
							</div>
						</fieldset>
					</form>	


				</div>
			</div>
		</div>
	</div>
</div>
<script type="text/javascript">

var topic_content = UM.getEditor("topic_content");  

$(document).ready(function(){
});

</script>
